package com.fj.redisson.config;

import org.springframework.boot.context.properties.ConfigurationProperties;

/**
 * @author fj
 * @date 2023/12/27 16:35
 */
@ConfigurationProperties(prefix = "spring.redisson")
public class RedissonProperties {
    private String host = "localhost";
    private int port = 6379;
    private int db = 0;
    private String username;
    private String password;

    public String getHost() {
        return host;
    }

    public void setHost(String host) {
        this.host = host;
    }

    public int getPort() {
        return port;
    }

    public void setPort(int port) {
        this.port = port;
    }

    public int getDb() {
        return db;
    }

    public void setDb(int db) {
        this.db = db;
    }

    public String getUsername() {
        return username;
    }

    public void setUsername(String username) {
        this.username = username;
    }

    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password;
    }

    @Override
    public String toString() {
        return "RedissonProperties{" +
                "host='" + host + '\'' +
                ", port=" + port +
                ", db=" + db +
                ", username='" + username + '\'' +
                ", password='" + password + '\'' +
                '}';
    }
}
